<include file="Public/sui_header" />
  <div class="card">
    <div class="card-content">
      <div class="card-content-inner">
  <form method="post">
      <div class="list-block">
        <ul>
          <li>
            <div class="item-content">
              <div class="item-media"><i class="fa fa-phone"></i></div>
              <div class="item-inner">
                <div class="item-title label">用户名</div>
                <div class="item-input">
                  <input type="text" name="username" id="username" placeholder="请填写手机号码">
                </div>
              </div>
            </div>
          </li>
          <li>
            <div class="item-content">
              <div class="item-media"><i class="fa fa-codepen"></i></div>
              <div class="item-inner">
                <div class="item-title label">验证码</div>
                <div class="item-input">
                  <a class="button" id="verify-button" onclick="getVerifyCode();">点击获取</a>
                  <input type="hidden" id="verify-code" name="verify-code" placeholder="请填写短信验证码">
                </div>
              </div>
            </div>
          </li>
          <li>
            <div class="item-content">
              <div class="item-media"><i class="fa fa-key"></i></div>
              <div class="item-inner">
                <div class="item-title label">密码</div>
                <div class="item-input">
                  <input type="password" name="password" placeholder="请填写密码">
                </div>
              </div>
            </div>
          </li>
          <li>
            <div class="item-content">
              <div class="item-media"><i class="fa fa-key"></i></div>
              <div class="item-inner">
                <div class="item-title label">重复密码</div>
                <div class="item-input">
                  <input type="password" name="repassword" placeholder="请重复密码">
                </div>
              </div>
            </div>
          </li>
        </ul>
     </div>
  <div class="content-block" style="margin-top: 1.2rem;">
    <div class="row">
      <div class="col-50"><a href="#" class="button button-big button-fill button-danger return">返回</a></div>
      <div class="col-50"><input type="submit" value="提交" class="button button-big button-fill button-success"/></div>
    </div>
  </div>

  </form>
</div>
    </div>
  </div>
  <script type="text/javascript">
    function getVerifyCode() {
        var phone = $('#username').val();
        var phonereg = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\d{8})$/; 
        if(!phonereg.test(phone)) { 
            alert('请输入有效的手机号码！'); 
            return false; 
        } else {
            $('#verify-button').hide();
            $('#verify-code').attr('type', 'text');
            $.post("/Home/User/sendVerifyCode",{phone:phone},function(result){
                console.log(result);
                alert('验证码发送成功!');
            });
        }
    }
  </script>

<include file="Public/sui_footer" />
